package com.hitalkie.teacher.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.TextView;

import com.hitalkie.teacher.R;
import com.hitalkie.teacher.util.Utils;

/**
 * Date 04/01/2017
 *
 * @author charliema
 */

public class AboutActivity extends BaseActivity {


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initView();
        updateVersionView();
    }

    private void initView() {
        setContentView(R.layout.view_about);
        initTitleBar();

    }
    private void updateVersionView() {
        String localVersionStr = Utils.getAppVersionName(this);
        TextView tvVersion = (TextView) findViewById(R.id.tvVersion);
        tvVersion.setText(localVersionStr);
    }

    private void initTitleBar() {
        findViewById(R.id.viewTitleBarLeft).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                getActivity().finish();
            }
        });
    }

}
